<?php

include('globalUtilitiesParameters.php');


function callingPostWire($text){
  global $elggWebServicesURL;
  global $elggApiKey;
  $url=$elggWebServicesURL;
	$apiKey=$elggApiKey;
	

	$fields='method=wire.post&text='.	urlencode($text) .'&api_key=' . $apiKey;	
   
	$ch = curl_init();

	//set the url, number of POST vars, POST data
	curl_setopt($ch,CURLOPT_URL, $url);
	curl_setopt($ch,CURLOPT_POST, 3);
	curl_setopt($ch,CURLOPT_POSTFIELDS, $fields);

	//execute post
	$result = curl_exec($ch);
     echo ' El resultado es: .... ' . $result ;
	//close connection
	curl_close($ch);
				
				
}

?>